Personal Computer World 1983 March page 122

G007 GRAPHICS MODULE

Maggie Burton takes a close look at the Notting Dale Information Technology Centre's G007 graphics board for the ZX81.

The pictures on this page were all produced using a ZX81 upgraded with a simple, inexpensive add-on. In that light they’re quite striking, especially when the resolution is considered. It’s 256×192 pixels, which compares favourably to the Spectrum’s maximum of 256×176 when programmed in Basic.

This add-on is the G007 Module from Notting Dale ITeC — the first product they’ve put on the market. It was designed by a student, Gary Keall, while he was on holiday, using equipment at Notting Dale, and was originally a hobby project. Keall wanted to increase the graphic capability of his ZX81 and eventually he handed production rights over to Notting Dale.

Originally it was felt that the board should be uncased. The version I have used is one of these earlier ones and it connects horizontally to the back of the ZX81, lying flat behind it. Production models are enclosed in a smart black box which snaps into the ZX81 in the same way, standing vertically.

The uncased board is rather unstable to use. As it doesn’t lie absolutely flat but tilts downwards a little it is very prone to jolts and nudges which have the undesirable effect of crashing the computer. The cased version stands more firmly, although in some circumstances — for instance, when a ZX Printer is being used — it could need propping in place in some way or another. An idea of its shape can be gained from a look at its dimensions. It’s rectangular in shape, being 16.6cm from left to right, 6cm high and 2.7cm from front to back (4cm if the edge connector is included).

There are some conditions for using the board which should be borne in mind, especially if your ZX81 is in any way modified.

The module will only work if the ZX81’s 1k of internal memory is in place and extra RAM of at least 8k is connected. The ideal RAM pack to use is naturally the Sinclair one, but Notting Dale has tested several other makes and found these all work, including some 64k ones. If in any doubt, of course, it would be advisable to consult them. Other hardware add-ons apart from the ZX Printer are not guaranteed to be compatible so again it would be wise to check. The ZX Printer connects between the board and the RAM pack.

Hardware modules and machine code programs which use the area of memory 2000 to 3000 hex should not be used with the G007 (wouldn’t work, in fact) as the board reserves this area for its own use.


Effects generated with the G007.


Using the board

When the ZX81 is first switched on, the inverse video 'K' cursor appears as normal.

The first unusual thing to get used to is the fact that the ZX81 effectively now has two screens: the low-res one which is exactly the same as the basic ZX81 and the high-res one on which all G007 specific commands are executed. You can change between the two at will. The ZX81 defaults to the low-res screen initially and all program entry and editing is done using this display. Typing SLOW or FAST, followed by a number in the range of one to six, will change the display over to high-res, and typing SLOW will take you back to low-res. Changing from one mode to the other has no effect on the contents of either display.

This is a bit strange at first, but the more confusing (initially) aspect of the module lies in its modifications to Sinclair Basic (Table 1). Rather than adding new keywords, it has added parameters to the existing graphic-related ones and this is probably because of the ZX81’s single-key keyword entry. An example of this is the use of SLOW as outlined above. A better one is the G007’s use of PLOT. The ZX81 uses the format PLOT x,y with x and y being the coordinates of the pixel to be shaded. For G007 purposes the formal PLOT n,x,y is used; with n specifying one of 115 separate plotting functions available — hardly a capability to be sneezed at.

Although this is confusing at first, your only real problem lies in remembering which value of n specifies which function — or looking them up all the time as I did. They are summarised at the end of the manual.

As mentioned before, the ‘old’ ZX81 capabilities have all been retained. The first command specific to the G007 in a program sets the display to high-res mode. UNPLOT on the high-res screen has been replaced by PLOT 0,x,y. When a program is listed (which can only happen in low-res mode) the message ‘G007’ is displayed rather than the usual ‘0/0’.

Some slight disadvantages are encountered in the use of the high-res screen. The first of these is the rather common one of being able to see only one command line at the bottom of the screen, as per RML 480Z, among others. It can become rather tedious changing mode every time you want to make a modification to a program, but this is cosmetic more than anything else. The second of these is the fact that rerunning a high-res program does not automatically clear the screen. Unless a CLS command is inserted, re-running a drawing program will simply overwrite what was there before, making a really messy screen. Lastly, the display sometimes tends to waver to the right at the top. Remedying this is simple enough. In high-res mode you just type POKE 8833,0. POKEing 8833 with any value other than 0 or 237 crashes the computer.

Table 1.

Command New Format New Functions
SLOW SLOW n(n=1 to 6) Sets display and PRINT modes
FAST FAST n
CLS CLS n(n=1 to 3) Clears high/low res screen, inverts display.
COPY COPY n(n=0 or 1) copies high/low res display to ZX Printer.
PLOT PLOT n(n= -1 to 130) Plots points, draws lines, moves graphic origin, unplots, fills and textures triangles, specifies line types.
PRINT Syntax as before. One of six modes set by value of n in SLOW/FAST commands. Prints as normal, prints with print black/white/inverted foreground or inverted background depending on mode.

This globe picture took 40 minutes to construct.


Programming

The G007 manual contains several demonstration programs which quickly illustrate the capabilities of the module.

A quick look at the summary of commands will show that the PLOT command is the one around which most of the G007’s functions are centred. For the sake of clarity I’ll go through the PLOT functions one by one and outline what they do.

Points can be plotted in any position on the screen either relative to the graphic origin (the bottom left point) or to absolute coordinates. These can be in black, white or inverse video. PLOT 12,x,y is the equivalent of a MOVE command.

Lines are drawn from the last point plotted (or the original if no points have yet been plotted) to the point specified. Again these can be to either absolute or relative coordinates, in black, white or inverse or with the last point missing. A useful provision is that of three line types apart from solid ones. These could not only lend variety and texture to a picture, but are also useful in drawing graphs. The three types are coarse, fine or chain-dotted and all are obtained by adding 32, 64 or 69 respectively to the basic line drawing values for n.

It is also possible to fill and texture triangles in a similar way to that in which lines are drawn. Vertices are the last two points plotted (or the two ends of the last line) and the current one. Texturing is not possible on an inverted screen. The default texture (given by putting n in the range 73-80) is a chequered pattern which is quite effective. This can be changed by inserting POKE statements into a program to change the values of the two bytes determining texture. Left or right diagonal shading, cross- hatching or fine dots can be obtained in this manner, although the relevant bytes must not be changed directly from low-res mode.

User defined characters

Defining your own characters with the G007 is, unfortunately, not the easiest of tasks. It is made possible by the fact that the module enables direct conversion between normal and inverse video — therefore the ZX81’s inverse video character set is no longer needed. Custom-made characters can be designed on an 8x8 grid, translated from binary numbers into decimal ones, POKEd into memory and then stored in a REM statement at the beginning of a program. The inverse character set vector is moved (again using POKE) to the address containing the first part of the user-defined character. The addresses containing all subsequent parts of the character must be consecutive. Characters are printed using CHR$.

It’s plain that this is not the easiest way to define characters. But it’s effective and is protected from NEW as the area of memory between 8448 and 8703 decimal is reserved for storing the necessary data. It is possible to redefine the whole of the ZX81 character set in this way, but extra memory must be reserved to do this.

User-defined characters are complemented by the facility to mix predefined characters and graphics on the high-res screen. This is a flexible capability, especially when compared to the normal ZX81 facilities. Six printing modes are provided, specified by the value of n following a SLOW or FAST command. These modes are quite versatile and you can switch from one to another within a program using SLOW and FAST.

Text is treated as having a foreground and a background. The foreground can be in black, white or inverted and the background can be inverted. This means you can contrive things so that characters are invisibly printed on the screen.

Documentation

An attractively bound manual is provided with the G007. While it is easy to follow and quite friendly, it isn’t ideal reading for the beginner. All you need to know about the module is within it, with plenty of details in appendices at the back on the ins and outs of the memory, calling routines and system variables. It is, though, a manual which needs a fair amount of knowledge of normal Basic before it can be fully understood. This, however, is mostly due to the method of operating the board.

It begins with a list of operating conditions, and an introduction to the G007’s capabilities. It then goes step by step through each command used and finishes with a summary and technical details. In spite of the fact that it is in no way aimed at a naive user, it is quite adequate.

Conclusion

There are other graphics boards for the ZX81. Digital Integration makes one which costs £38.95, and provides lower case as well. The G007, however, has the edge in the price department, costing just £32 + £4.80 VAT. It’s only available by mail order and 75p postage has to be paid.

It has to be said that operating it is not as simple as it might be. It provides very fast and crisp plotting and outputs well to the ZX Printer, but using it to the full really does take some careful thought and possibly background reading. This means it would be a useful educational tool once a beginner has got past the very first stages, and the possible results make the challenge of a bit of mental activity very worthwhile, as the display photos show.

Notting Dale guarantees the board for 12 months and will repair it (if repair is possible) after that time. A demonstration tape is supplied with it containing some games, more of which will be available in the near future. I’m told that they are 'open to suggestions’, according to production manager William Haynes, on the subject of software written for the G007 and would consider using any good ideas which come from customers.

All things considered, the G007 module is a worthwhile buy for any serious-minded ZX81 owner. It’s especially good value from the point of view of someone who can’t afford a more powerful computer because it makes high resolution computing possible for under £110 (at an educated guess, based on the cheapest available RAM pack prices).